import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
    state: {
		"server_home_url":"",
		"user_id":"",
		"user_name":"",
		"icon":"",
		"sex":"",
		"characters":[],
		"focused_users":[],
		is_focused_users:[],
		"msgs_list":[],
		"test":1
	},
    mutations: {
		setUserInfo(state,user){
			console.log(user.user_name);
			state.user_id=user._id;
			state.user_name=user.user_name;
			state.icon=user.icon;
			state.sex=user.sex;
			state.characters=user.characters;
			state.focused_users=user.focused_users;
			state.is_focused_users=user.is_focused_users;
		}
	},
    actions: {}
})
export default store